import request from '@/router/axios';

export const getPageTree = () => {
    return request({
        url: '/api/mes-admin/page-area/tree',
        method: 'get'
    });
};

export const getDetail = (pagePath) => {
    return request({
        url: '/api/mes-admin/pageattribute/list',
        method: 'get',
        params: {
            pagePath
        }
    });
};

export const remove = (params) => {
    return request({
        url: '/api/mes-admin/pageattribute/remove-with-area',
        method: 'post',
        params: params
    });
};

export const add = (row) => {
    return request({
        url: '/api/mes-admin/pageattribute/submitOne',
        method: 'post',
        data: row
    });
};

export const getDetailAttribute = (params) => {
    return request({
        url: '/api/mes-admin/pageattribute/detail-with-area',
        method: 'get',
        params: params
    });
};

export const getPageAreaWithAttr = (params) => {
    return request({
        url: '/api/mes-admin/page-area/get-page-area-with-attr',
        method: 'get',
        params: params
    });
};
